package com.example.routeplansystem.define;

/**
 * @Author lucong
 * @Date 2022/8/18
 * @Description 用于模板文件下载的管理
 */

public enum FileEnum {
    NODE_FILE("node", "文件导点模板.xls"),
    VEHICLE_FILE("vehicleSystem", "文件车辆信息导入模板.xls"),
    RESULT("result", "结果导入模板.xls"),
    QUESTION_NODE_FILE("questionNode","项目客户导入模板.xls");

    private String path;
    private String fileName;

    public static FileEnum getFile(String path) {
        FileEnum[] fileEnums = values();
        for (FileEnum fileEnum : fileEnums) {
            if (fileEnum.path.equals(path)) return fileEnum;
        }
        return null;
    }

    public String getPath() {
        return path;
    }

    public String getFileName() {
        return fileName;
    }

    FileEnum(String path, String fileName) {
        this.path = path;
        this.fileName = fileName;
    }
}
